/**
 * @author zhoujunjie
 * @desc TODO
 * @date 2025/4/11
 */
public class Test11 {
        public static void main(String[] args) {
            int n = 100000000;
            double sum = 0;
            for (int m = 0; m < n; m++) {
                double x;
                if (m % 2 == 0) {
                    x = 1.0 / (2 * m + 1);
                } else {
                    x = -1.0 / (2 * m + 1);
                }
                sum += x;
            }
            double pai = sum * 4;
            System.out.println( pai );
        }
    }
